// import {getlink} from "@/api/getapi.js"
// export let shopm={
//   state:{
//     shopnum:[],
//     photoarr:[],
//     pricearr:[],
//     shopnamearr:[]
//   },
//   mutations:{
    
//   }
// }


import { getlink } from "@/api/getapi.js"
export let shopm= {
    state: {
        arr: []
    },
    mutations: {
        shop(state, payload) {
            // console.log(payload)
            state.arr = payload
        }
    },
    actions: {
        shopData(context, payload) {
            getlink(payload.url).then((ok) => {
                console.log(ok.data)
                context.commit("shop", ok.data)
            }).catch((err) => {
                console.log("失败", err)
            })
        }
    },
}